package com.fdb.efp.nls.service.common.rules.credit;

import com.fdb.basic.framework.core.constant.EsbRetCodeStandard;
import com.fdb.basic.framework.core.exception.BizException;
import com.fdb.efp.nls.service.common.rules.CheckRule;

/**
 * 需求编号:2019D08--
 * 问题编号:
 * 开发人员: caoxin
 * 创建日期:2020/4/23
 * 功能描述:
 * 修改日期:2020/4/23
 * 修改描述:
 */
public class CtrLoanIsActiveRule implements CheckRule {
    public static final String CONT_STATUS_200 = "200";
    private String loanCtrStatus;

    public CtrLoanIsActiveRule(String loanCtrStatus) {
        this.loanCtrStatus = loanCtrStatus;
    }

    @Override
    public void check() throws BizException {
        if (!CONT_STATUS_200.equals(loanCtrStatus)) {
            throw new BizException(EsbRetCodeStandard.WFJKYWGZ.getValue(), "该用户授信合同不为生效状态，请核查！");
        }
    }
}
